Skip to content

Conversation

rafikhan
Copy link
Contributor

@rafikhan rafikhan commented Sep 4, 2025

This commit introduces a new developer documentation hub under the devdocs directory. The goal of this new documentation is to provide a comprehensive resource for developers working on the Firestore JS SDK.

The new documentation includes:

  • Overview: A high-level overview of the SDK, its goals, and architecture.
  • Prerequisites: A guide for new contributors, outlining the necessary skills and knowledge.
  • Architecture: A detailed explanation of the SDK's architecture, core components, and data flow.
  • Code Layout: A document that explains the structure of the codebase.
  • Build & Testing: Initial documents for the build and testing processes.

This commit introduces a new developer documentation hub under the `devdocs` directory. The goal of this new
documentation is to provide a comprehensive resource for developers working on the Firestore JS SDK.

The new documentation includes:

- **Overview:** A high-level overview of the SDK, its goals, and architecture.
- **Prerequisites:** A guide for new contributors, outlining the necessary skills and knowledge.
- **Architecture:** A detailed explanation of the SDK's architecture, core components, and data flow.
- **Code Layout:** A document that explains the structure of the codebase.
- **Build & Testing:** Initial documents for the build and testing processes.
@rafikhan rafikhan requested review from a team as code owners September 4, 2025 21:25
Copy link

changeset-bot bot commented Sep 4, 2025

⚠️ No Changeset found

Latest commit: 2cb4c15

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rafikhan rafikhan self-assigned this Sep 4, 2025
@rafikhan rafikhan marked this pull request as draft September 4, 2025 21:26
@google-oss-bot
Copy link
Contributor

@google-oss-bot
Copy link
Contributor

Copy link
Contributor

@ehsannas ehsannas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. A few minor comments below.


1. **API Layer**: A user initiates a write operation (e.g., `setDoc`, `updateDoc`, `deleteDoc`).
2. **Sync Engine**: The call is routed to the Sync Engine, which wraps the operation in a "mutation".
3. **Mutation Queue (in Local Store)**: The Sync Engine adds this mutation to the Mutation Queue. The queue is persisted to the **Persistence Layer** (IndexedDB). At this point, the SDK "optimistically" considers the write successful locally.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overlays were added which is missing from the diagram and the description.


The SDK is composed of several key components that work together to provide the full range of Firestore features.

![Architecture Diagram](./architecture.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if a graphviz dot representation of the diagram would be better to use rather than a png file.

Comment on lines +31 to +43
TODO: Add critical information about the build process including optimizations for code size, etc.

For information on how the artifacts are built, please see the [Build documentation](./build.md) file.

## Testing

TODO: Add critical information about the tests harness, organization, spec tests, etc.

For information on how the tests are setup and organized [Testing documentation](./testing.md) file.

## Developer Workflow

TODO: Add list of common commands here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fill in the remaining TODOs (or remove the incomplete sections for now?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants